1. Field of the Invention
The present invention relates to numerical controllers and, in particular, to a numerical controller having the function of automatically selecting a storage destination of a machining program in accordance with the contents of the machining program.
2. Description of the Related Art
A numerical controller for controlling a machine tool incorporates nonvolatile memory for storing a machining program. Moreover, external storage units such as a memory card and a drive of a computer with which connection is established by a network can also be used for storage of the machining program.
On the other hand, the technique of collectively treating a plurality of devices having different characteristics as one storage unit is known in, for example, Japanese Patent Application Laid-Open No. 2006-4011.
When control of the machine tool based on the machining program is performed by the numerical controller, if the machining program is stored in the external storage unit and control based on the machining program is performed, reading of data is sometimes not completed in time in an operation which is required to be performed at high speed because reading and writing of data from and to the external storage unit is performed at low speed. Thus, in order to avoid such a situation, an operator determines whether or not high-speed performance is required by checking the contents of the machining program in advance and, if high-speed performance is required, the operator sets the nonvolatile memory as a storage location; if high-speed performance is not required, the operator sets the external storage unit as a storage location. However, such an operation is burdensome and the operator may make mistakes by making a misjudgment.
By using the above-described known technique of collectively treating a plurality of devices as one storage unit, the operator does not have to keep a storage destination of a machining program in mind, but there is a possibility that a machining program which is required to be read at high speed is stored in a low-speed external storage unit.
In the technique disclosed in Japanese Patent Application Laid-Open No. 2006-4011 mentioned above, when a plurality of external storage units are collectively treated as one storage unit, a storage-destination device is determined by the characteristics of a device and the characteristics of a file to be stored. In that case, a judgment on the application or attribute of the file is made by the extension or size of the file. However, in the case of a machining program, since there is a need to determine whether or not high-speed readout is necessary based on the contents of the machining program, the application or attribute of the file cannot be determined by the extension or size of the file.